package com.wbp.cms.core.project.dao;

import java.util.List;
import org.springframework.stereotype.Repository;
import com.wbp.cms.client.project.domain.ProjectWorkOrderDO;
import com.wbp.cms.client.project.query.ProjectWorkOrderQuery;
import com.wbp.cms.core.dao.BaseDao;


/**
 * @Description:
 * @Department:
 * @author andy.lhc
 * @date 2016年3月9日 下午3:08:20
 */
@Repository("projectWorkOrderDAO")
public class ProjectWorkOrderDAO extends BaseDao {

  public Long  insert(ProjectWorkOrderDO  projectWorkOrder){
    super.insert("ProjectWorkOrderMapper.insert", projectWorkOrder) ;
    return  projectWorkOrder.getId() ;
  }
  
  public int  update(ProjectWorkOrderDO  projectWorkOrder){
      return  super.update("ProjectWorkOrderMapper.update", projectWorkOrder) ;
  }
  
  public ProjectWorkOrderDO  load(Long  id){
    Object obj = super.selectOneObject("ProjectWorkOrderMapper.load", id) ;
    return obj == null ? null : (ProjectWorkOrderDO)obj ;
  }
  
  public List<ProjectWorkOrderDO>  query(ProjectWorkOrderQuery  projectWorkOrderQuery){
    return super.selectList("ProjectWorkOrderMapper.query", projectWorkOrderQuery) ;
  }
  
  public Integer  queryCount(ProjectWorkOrderQuery  projectWorkOrderQuery){
    Object obj = super.selectOneObject("ProjectWorkOrderMapper.queryCount", projectWorkOrderQuery) ;
    return obj == null ? 0 : (Integer)obj ;
  }
 
  
}
